// @Author: Duanxj
// @Description:
// @Version: 1.0.0
// @Date: 2021/4/7
// @Time: 9:12

package v1

import (
	"github.com/gin-gonic/gin"
	"microservice/web/controller"
)

func GetRouter() *gin.Engine {
	// 初始化路由
	router := gin.Default()
	// 设置静态资源
	router.Static("/home", "web/view")
	// 路由分组
	{
		v1 := router.Group("api/v1.0")
		v1.GET("/session", controller.GetSession)
		v1.GET("/imagecode/:uuid", controller.GetImageCd)
		v1.GET("/mailcode/:mail", controller.GetMailcd)
	}
	return router
}
